package de.suur.jarmi.common;

import java.io.Serializable;

/**
 * @author Martin Nonnenmacher
 */
public class Request implements Serializable {

	private static final long serialVersionUID = 1L;

	private String methodName;
	private Serializable[] parameters;
	private Class<?> serviceClass;
	private Class<?>[] parameterTypes;

	public Request(Class<?> serviceClass, String methodName,
			Serializable[] parameters, Class<?>[] parameterTypes) {
		this.serviceClass = serviceClass;
		this.methodName = methodName;
		this.parameters = parameters == null ? new Serializable[0] : parameters;
		this.parameterTypes = parameterTypes == null ? new Class<?>[0]
				: parameterTypes;
	}

	public String getMethodName() {
		return methodName;
	}

	public Serializable[] getParams() {
		return parameters;
	}

	public Class<?> getServiceClass() {
		return serviceClass;
	}

	public Class<?>[] getTypes() {
		return parameterTypes;
	}

}
